﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;
using WmsApp.WindowControl;

namespace WmsApp.WmsService
{
    public partial class SystemUser : IWcfState
    {
        public static SystemUser CreateSystemUser(String userID)
        {
            var r = new SystemUser
            {
                USERID = userID,
                ISVALID = Constant.IsValidTrue,
                PASSWORD = "",
                WcfEntityState = System.Data.EntityState.Added
            };
            r.BindPropertyChanged();
            return r;
        }

        public void BindPropertyChanged()
        {
            this.PropertyChanged += WmsApp.EntityControl.PropertyChangedHandler.EntityObjectPropertyChanged;
        }
    }
}